<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <title>使用fiddler抓包分析api | haijd</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  
  <meta name="keywords" content="UWP学习笔记" />
  
  
  
  
  <meta name="description" content="使用Fiddler抓包分析API">
<meta name="keywords" content="UWP学习笔记">
<meta property="og:type" content="article">
<meta property="og:title" content="使用Fiddler抓包分析API">
<meta property="og:url" content="http://www.hais2.com/2016/07/17/Fiddler-caught-analysis-API/index.html">
<meta property="og:site_name" content="haijd">
<meta property="og:description" content="使用Fiddler抓包分析API">
<meta property="og:locale" content="default">
<meta property="og:image" content="http://ww3.sinaimg.cn/mw690/c55a7aeejw1f5wvo3emwej20f10a7glv.jpg">
<meta property="og:image" content="http://ww4.sinaimg.cn/mw690/c55a7aeejw1f5wwxb99qaj20f60af74m.jpg">
<meta property="og:image" content="http://ww2.sinaimg.cn/mw690/c55a7aeejw1f5wx0q0nisj20px0gp0tb.jpg">
<meta property="og:image" content="http://ww2.sinaimg.cn/mw690/c55a7aeejw1f5wy9i9wncj20r60ckgmr.jpg">
<meta property="og:image" content="http://ww3.sinaimg.cn/mw690/c55a7aeejw1f5wy8pts28j20u01hcthj.jpg">
<meta property="og:updated_time" content="2017-08-02T15:22:33.000Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="使用Fiddler抓包分析API">
<meta name="twitter:description" content="使用Fiddler抓包分析API">
<meta name="twitter:image" content="http://ww3.sinaimg.cn/mw690/c55a7aeejw1f5wvo3emwej20f10a7glv.jpg">
  
    <link rel="alternate" href="/atom.xml" title="haijd" type="application/atom+xml">
  
  <link rel="icon" href="/css/images/favicon.ico">
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  <link href="https://fonts.googleapis.com/css?family=Open+Sans|Montserrat:700" rel="stylesheet" type="text/css">
  <link href="https://fonts.googleapis.com/css?family=Roboto:400,300,300italic,400italic" rel="stylesheet" type="text/css">
  <link href="//cdn.bootcss.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet">
  <style type="text/css">
    @font-face{font-family:futura-pt;src:url(https://use.typekit.net/af/9749f0/00000000000000000001008f/27/l?subset_id=2&fvd=n5) format("woff2");font-weight:500;font-style:normal;}
    @font-face{font-family:futura-pt;src:url(https://use.typekit.net/af/90cf9f/000000000000000000010091/27/l?subset_id=2&fvd=n7) format("woff2");font-weight:500;font-style:normal;}
    @font-face{font-family:futura-pt;src:url(https://use.typekit.net/af/8a5494/000000000000000000013365/27/l?subset_id=2&fvd=n4) format("woff2");font-weight:lighter;font-style:normal;}
    @font-face{font-family:futura-pt;src:url(https://use.typekit.net/af/d337d8/000000000000000000010095/27/l?subset_id=2&fvd=i4) format("woff2");font-weight:400;font-style:italic;}</style>
    
  <link rel="stylesheet" id="athemes-headings-fonts-css" href="//fonts.googleapis.com/css?family=Yanone+Kaffeesatz%3A200%2C300%2C400%2C700&amp;ver=4.6.1" type="text/css" media="all">
  <link rel="stylesheet" href="/css/style.css">

  <script src="/js/jquery-3.1.1.min.js"></script>

  <!-- Bootstrap core CSS -->
  <link rel="stylesheet" href="/css/bootstrap.css" >
  <link rel="stylesheet" href="/css/hiero.css" >
  <link rel="stylesheet" href="/css/glyphs.css" >
  
    <link rel="stylesheet" href="/css/vdonate.css" >
  

</head>

<script>
var themeMenus = {};

  themeMenus["/"] = "Home"; 

  themeMenus["/archives"] = "Archives"; 

  themeMenus["/categories"] = "Categories"; 

  themeMenus["/tags"] = "Tags"; 

  themeMenus["/about"] = "About"; 

</script>


  <body data-spy="scroll" data-target="#toc" data-offset="50">


  <header id="allheader" class="site-header" role="banner">
  <div class="clearfix container">
      <div class="site-branding">

          <h1 class="site-title">
            
              <a href="/" title="haijd" rel="home"> haijd </a>
            
          </h1>

          
            <div class="site-description">Stay Hungry,Stay Foolish</div>
          
            
          <nav id="main-navigation" class="main-navigation" role="navigation">
            <a class="nav-open">Menu</a>
            <a class="nav-close">Close</a>
            <div class="clearfix sf-menu">

              <ul id="main-nav" class="nmenu sf-js-enabled">
                    
                      <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-home menu-item-1663"> <a class="" href="/">Home</a> </li>
                    
                      <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-home menu-item-1663"> <a class="" href="/archives">Archives</a> </li>
                    
                      <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-home menu-item-1663"> <a class="" href="/categories">Categories</a> </li>
                    
                      <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-home menu-item-1663"> <a class="" href="/tags">Tags</a> </li>
                    
                      <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-home menu-item-1663"> <a class="" href="/about">About</a> </li>
                    
              </ul>
            </div>
          </nav>


      </div>
  </div>
</header>




  <div id="container">
    <div id="wrap">
            
      <div id="content" class="outer">
        
          <section id="main" style="float:none;"><article id="post-Fiddler-caught-analysis-API" style="width: 66%; float:left;" class="article article-type-post" itemscope itemprop="blogPost" >
  <div id="articleInner" class="clearfix post-1016 post type-post status-publish format-standard has-post-thumbnail hentry category-template-2 category-uncategorized tag-codex tag-edge-case tag-featured-image tag-image tag-template">
    
    
      <header class="article-header">
        
  
    <h1 class="thumb" class="article-title" itemprop="name">
      使用Fiddler抓包分析API
    </h1>
  

      </header>
    
    <div class="article-meta">
      
	Posted on <a href="/2016/07/17/Fiddler-caught-analysis-API/" class="article-date">
	  <time datetime="2016-07-17T05:22:44.000Z" itemprop="datePublished">July 17, 2016</time>
	</a>

      
	<span id="busuanzi_container_page_pv">
	  本文总阅读量<span id="busuanzi_value_page_pv"></span>次
	</span>

    </div>
    <div class="article-entry" itemprop="articleBody">
      
        <blockquote>
<p>Fiddler是一个http协议调试代理工具，它能够记录并且检查所有你的电脑和互联网之间的http通讯，设置断点，查看所有的“进出”Fiddler的数据（指cookie,html,js,css等文件，这些都可以让你胡乱修改的意思）。 Fiddler 要比其他的网络调试器要更加简单，因为它不仅仅暴露http通讯还提供了一个用户友好的格式。Fiddler 是用C#写出来的,它包含一个简单却功能强大的基于JScript .NET 事件脚本子系统，它的灵活性非常棒，可以支持众多的http调试任务，并且能够使用.net框架语言进行扩展。</p>
</blockquote>
<p>　　摘录一下百科的解释，简单点说Fiddler是个抓包工具，测试人员可能用的比较多，在UWP开发中使用的，就是为了开发第三方的软件而进行分析API接口，至于为啥要开发第三方的UWP，这得把巨硬抓起来打一顿就知道了。
　　</p>
<h2 id="准备"><a href="#准备" class="headerlink" title="准备"></a>准备</h2><p>　　需要的工具：Android手机，电脑，WiFi。<br>　　首先我们去官网(<a href="https://www.telerik.com/download/fiddler" target="_blank" rel="noopener">www.telerik.com</a>)下载并安装Fiddler软件。<a id="more"></a></p>
<h2 id="设置Fiddler"><a href="#设置Fiddler" class="headerlink" title="设置Fiddler"></a>设置Fiddler</h2><p>　　<strong>设置HTTPS代理和允许客户端/服务端代理</strong><br>　　打开软件，依次选择Tools&gt;Fiddler Options…打开该选项卡。<br>　　进入<em>HTTPS</em>选项，勾选下列项：<br><img src="http://ww3.sinaimg.cn/mw690/c55a7aeejw1f5wvo3emwej20f10a7glv.jpg" alt=""><br>　　进入<em>connections</em>选项，勾选下列项，并填写端口号(默认为8888)：<br><img src="http://ww4.sinaimg.cn/mw690/c55a7aeejw1f5wwxb99qaj20f60af74m.jpg" alt=""><br>　　因为我们现在需要抓包手机，所以为了避免电脑端通讯的干扰，我们要检查一下电脑是否被Fiddler代理，如果是的话就关闭该代理。<br><img src="http://ww2.sinaimg.cn/mw690/c55a7aeejw1f5wx0q0nisj20px0gp0tb.jpg" alt=""></p>
<h2 id="设置手机端"><a href="#设置手机端" class="headerlink" title="设置手机端"></a>设置手机端</h2><p>　　<strong>首先，保证手机和PC处于同一局域网中(PC分享WiFi给手机，或者笔记本和手机连接同一个WiFi)。</strong><br>　　1. 使用命令行(ipconfig)查看电脑的IP地址。(我这里使用的笔记本分享的网络，选择了手机连接的这个网络的IP地址)<br><img src="http://ww2.sinaimg.cn/mw690/c55a7aeejw1f5wy9i9wncj20r60ckgmr.jpg" alt=""><br>　　2. 手机连接该WiFi，然后在高级设置中，配置HTTP代理。<br><img src="http://ww3.sinaimg.cn/mw690/c55a7aeejw1f5wy8pts28j20u01hcthj.jpg" alt=""></p>
<h2 id="开始抓包分析数据"><a href="#开始抓包分析数据" class="headerlink" title="开始抓包分析数据"></a>开始抓包分析数据</h2><p>　　接下来，我们以网易公开课App为例，说明一下如何分析接口数据。</p>
<p>　　1. 打开网易公开课App，然后观察Fiddler软件抓取到的数据。<br>　　2. 对比App和Fiddler中的数据。</p>
<p>　　</p>

      
    </div>
    <footer class="entry-meta entry-footer">
      
	<span class="ico-folder"></span>
    <a class="article-category-link" href="/categories/UWP/">UWP</a>

      
  <span class="ico-tags"></span>
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/UWP学习笔记/">UWP学习笔记</a></li></ul>

      
        <div id="donation_div"></div>

<script src="/js/vdonate.js"></script>
<script>
var a = new Donate({
  title: '如果觉得我的文章对您有用，请随意打赏。您的支持将鼓励我继续创作!', // 可选参数，打赏标题
  btnText: 'Donate', // 可选参数，打赏按钮文字
  el: document.getElementById('donation_div'),
  wechatImage: '/css/images/wechatPay.png',
  alipayImage: '/css/images/alipay.jpg'
});
</script>
      

      
        
	<section id="comments" class="comment">
	  <div id="disqus_thread">
	  <noscript>Please enable JavaScript to view the <a href="//disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
	  </div>
	</section>

	<script type="text/javascript">
	var disqus_shortname = 'haijdblog';
	(function(){
	  var dsq = document.createElement('script');
	  dsq.type = 'text/javascript';
	  dsq.async = true;
	  dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
	  (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
	}());
	(function(){
	  var dsq = document.createElement('script');
	  dsq.type = 'text/javascript';
	  dsq.async = true;
	  dsq.src = '//' + disqus_shortname + '.disqus.com/count.js';
	  (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
	}());
	</script>


      
    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/2016/07/17/Value-types-and-reference-types/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Newer</strong>
      <div class="article-nav-title">
        
          值类型和引用类型
        
      </div>
    </a>
  
  
    <a href="/2016/05/14/Hexo-Getting-Started-1/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Older</strong>
      <div class="article-nav-title">8、使用SSH方式部署博客</div>
    </a>
  
</nav>

  
</article>

<!-- Table of Contents -->

  <aside id="sidebar">
    <div id="toc" class="toc-article">
    <strong class="toc-title">Contents</strong>
    
      <ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#准备"><span class="nav-number">1.</span> <span class="nav-text">准备</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#设置Fiddler"><span class="nav-number">2.</span> <span class="nav-text">设置Fiddler</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#设置手机端"><span class="nav-number">3.</span> <span class="nav-text">设置手机端</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#开始抓包分析数据"><span class="nav-number">4.</span> <span class="nav-text">开始抓包分析数据</span></a></li></ol>
    
    </div>
  </aside>
</section>
        
      </div>
      <footer id="footer" class="site-footer">
  

  <div class="clearfix container">
      <div class="site-info">
	      &copy; 2018 haijd All Rights Reserved.
          
            <span id="busuanzi_container_site_uv">
              本站访客数<span id="busuanzi_value_site_uv"></span>人次  
              本站总访问量<span id="busuanzi_value_site_pv"></span>次
            </span>
          
      </div>
      <div class="site-credit">
        Theme by <a href="https://github.com/iTimeTraveler/hexo-theme-hiero" target="_blank">hiero</a>
      </div>
  </div>
</footer>


<!-- min height -->

<script>
    var contentdiv = document.getElementById("content");

    contentdiv.style.minHeight = document.body.offsetHeight - document.getElementById("allheader").offsetHeight - document.getElementById("footer").offsetHeight + "px";
</script>
    </div>
    <!-- <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">Home</a>
  
    <a href="/archives" class="mobile-nav-link">Archives</a>
  
    <a href="/categories" class="mobile-nav-link">Categories</a>
  
    <a href="/tags" class="mobile-nav-link">Tags</a>
  
    <a href="/about" class="mobile-nav-link">About</a>
  
</nav> -->
    

<!-- mathjax config similar to math.stackexchange -->

<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    tex2jax: {
      inlineMath: [ ['$','$'], ["\\(","\\)"] ],
      processEscapes: true
    }
  });
</script>

<script type="text/x-mathjax-config">
    MathJax.Hub.Config({
      tex2jax: {
        skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
      }
    });
</script>

<script type="text/x-mathjax-config">
    MathJax.Hub.Queue(function() {
        var all = MathJax.Hub.getAllJax(), i;
        for(i=0; i < all.length; i += 1) {
            all[i].SourceElement().parentNode.className += ' has-jax';
        }
    });
</script>

<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>


  <link rel="stylesheet" href="/fancybox/jquery.fancybox.css">
  <script src="/fancybox/jquery.fancybox.pack.js"></script>


<script src="/js/scripts.js"></script>
<script src="/js/bootstrap.js"></script>
<script src="/js/main.js"></script>








	<script async src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js">
	</script>






  </div>

  <a id="rocket" href="#top" class=""></a>
  <script type="text/javascript" src="/js/totop.js" async=""></script>
</body>
</html>
